package com.agritech.smartfarming.factory;

import com.agritech.smartfarming.model.AgriculturalMachine;
import com.agritech.smartfarming.model.Tractor;

/**
 * 拖拉机工厂类，实现工厂方法模式
 */
public class TractorFactory implements AgriculturalMachineFactory {
    @Override
    public AgriculturalMachine createMachine(String id, String name) {
        System.out.println("创建新的拖拉机: " + name + " (ID: " + id + ")");
        return new Tractor(id, name);
    }
} 